<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>kltk.corpus.sejong.parsed</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="kltk-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://kltk.googlecode.com/">kltk</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="kltk-module.html">Package&nbsp;kltk</a> ::
        <a href="kltk.corpus-module.html">Package&nbsp;corpus</a> ::
        <a href="kltk.corpus.sejong-module.html">Package&nbsp;sejong</a> ::
        Module&nbsp;parsed
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="kltk.corpus.sejong.parsed-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module parsed</h1><p class="nomargin-top"><span class="codelink"><a href="kltk.corpus.sejong.parsed-pysrc.html">source&nbsp;code</a></span></p>
<p>Sejong Parsed Corpus Reader. Sejong Parsed Corpus (distributed 
  2007-12-11)</p>
  <p>The class ForestWalker is specific to the Sejong Parsed Corpus and all
  the other classes are general, i.e. reusable!</p>
  <h1 class="heading">USAGE</h1>
    <p>You have a Sejong parsed corpus file named 'BGJO0150.bnk'. At first,
    remove XML tags and check file encoding. :</p>
<pre class="literalblock">
       file = codecs.open('BGJO0150-noxml.bnk' encoding='utf-8')
       fw = ForestWalker(file)
</pre>
    <p><a href="kltk.corpus.sejong.parsed.ForestWalker-class.html" 
    class="link">ForestWalker</a> is an iterator of forest (treebank). It 
    isn't the treebank itself. It does NOT load trees to the memory. It's 
    light and fast! :</p>
<pre class="literalblock">
       for tree in fw:
               do (tree)
</pre>
    <p>If you want to get a fully-loaded <a 
    href="kltk.corpus.sejong.parsed.TreeBank-class.html" 
    class="link">TreeBank</a> object, try getTreeBank(). It takes some time
    according to the file size. :</p>
<pre class="literalblock">
       treebank = fw.getTreeBank()
</pre>
  <h1 class="heading">Classes</h1>
    <p>classes:</p>
<pre class="literalblock">
       ForestWalker

       TreeBank
               Tree[]
                       Sentence
                               Word[]
                                       Morph[]
                       Node

       TerminalNode
</pre>
  <h1 class="heading">Corpus sample</h1>
    <p>parsed corpus sample tree:</p>
<pre class="literalblock">
       ; &#44536; &#49888;&#49464;&#44228;&#50640; &#45257;&#46041; &#53468;&#50500;(&#20919;&#20941; &#32974;&#20818;)&#44032; &#46321;&#51109;&#54620;&#45796;.
               (S      (NP_AJT         (DP &#44536;/MM)
                                (NP_AJT &#49888;/XPN + &#49464;&#44228;/NNG + &#50640;/JKB))
                (S      (NP_SBJ         (NP     (NP     (NP &#45257;&#46041;/NNG)
                                                                                 (NP &#53468;&#50500;/NNG))
                                                                 (NP_PRN         (L (/SS)
                                                                                                  (NP_PRN         (NP     (NP &#20919;&#20941;/SH)
                                                                                                                                       (NP &#32974;&#20818;/SH))
                                                                                                       (R_PRN )/SS))))
                                 (X_SBJ &#44032;/JKS))
                 (VP &#46321;&#51109;/NNG + &#54616;/XSV + &#12596;&#45796;/EF + ./SF)))
</pre>

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="kltk.corpus.sejong.parsed.TreeParseError-class.html" class="summary-name">TreeParseError</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="kltk.corpus.sejong.parsed.ForestWalker-class.html" class="summary-name">ForestWalker</a><br />
      ForestWalker
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="kltk.corpus.sejong.parsed.TreeBank-class.html" class="summary-name">TreeBank</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="kltk.corpus.sejong.parsed.Tree-class.html" class="summary-name">Tree</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="kltk.corpus.sejong.parsed.Node-class.html" class="summary-name">Node</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="kltk.corpus.sejong.parsed.TerminalNode-class.html" class="summary-name">TerminalNode</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="kltk.corpus.sejong.parsed.Sentence-class.html" class="summary-name">Sentence</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="kltk.corpus.sejong.parsed.Encode-class.html" class="summary-name">Encode</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="kltk.corpus.sejong.parsed.Test-class.html" class="summary-name">Test</a>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'kltk.corpus.sejong'"><code class="variable-quote">'</code><code class="variable-string">kltk.corpus.sejong</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="kltk-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://kltk.googlecode.com/">kltk</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Oct 17 21:29:06 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
